var i;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var EventManager = require("AA_EventManager");
var ResKeeper = require("AA_ResKeeper");
var EvenType = require("AA_EvenType");
var _decorator = cc._decorator;
var _ccclass = _decorator.ccclass;
_decorator.property;

var _def_CameraShak = function (e) {
  function _creator() {
    return null !== e && e.apply(this, arguments) || this;
  }
  __extends(_creator, e);
  _creator.prototype.onEnable = function () {
    EventManager.EventMgr.addEventListener(EvenType.EVENT_TYPE.COMMON_SHAK, this.Shake1, this);
  };
  _creator.prototype.onDisable = function () {
    EventManager.EventMgr.rmEventListener(EvenType.EVENT_TYPE.COMMON_SHAK, this.Shake1, this);
  };
  _creator.prototype.Shake1 = function () {
    var e = this;
    cc.tween(this.node).by(.05, {
      position: cc.v3(8, 8)
    }).by(.05, {
      position: cc.v3(-16, -16)
    }).by(.05, {
      position: cc.v3(8, 8)
    }).call(function () {
      e.node.setPosition(cc.Vec2.ZERO);
    }).start();
  };
  return __decorate([_ccclass], _creator);
}(ResKeeper.default);
exports.default = _def_CameraShak;